<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>TZ-追梦</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        #box{}
        .div p{}
    </style>
</head>
<body>
    <div id="box" class="div">box</div>
    <div  class="div">
        <p>0</p>
        <p>1111</p>
    </div>

    <ul>
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li>4</li>
        <li>5</li>

    </ul>
    <ul>
        <li>1</li>
    </ul>
    <script>

        //var oDiv = document.getElementById('box');  获取一个
        //var oDiv = document.querySelector('#box');  获取一个
        //var aDiv = document.getElementsByTagName('div');  获取一组
        //var aDiv = document.querySelectorAll('div');  获取一组
        //var aDiv = document.querySelectorAll('.div p')[1];
        //console.log( aDiv.innerHTML );

        //var oUl = document.querySelector('ul');
        //oUl.innerHTML += oUl.innerHTML;
        //var aLi = oUl.querySelectorAll('li');
        //oUl.style.background = 'gray';
        //console.log( aLi.length );

        //console.log( aLi.length );
    </script>
</body>
</html>